﻿#include <iostream>

using namespace std;

class TestPaper {
public:
    virtual string Answer1() = 0;
    virtual string Answer2() = 0;
    virtual string Answer3() = 0;
    virtual void TestQuestion1() {
        cout << "杨过得到，后来给郭靖，炼成倚大剑、屠龙刀的玄铁可能是():" << endl;
        cout << "a.球磨铸铁  b.马口铁  c.高速合金钢  d.碳素纤维" << endl;
        cout << "答案: " << Answer1() << endl;
    }
    virtual void TestQuestion2() {
        cout << "杨过、程英、陆无双铲除了情花，造成():" << endl;
        cout << "a.使这种植物不再害人  b.使一种珍稀物种灭绝  c.破坏了那个生物圈的生态平衡  d.造成该地区沙漠化" << endl;
        cout << "答案: " << Answer2() << endl;
    }
    virtual void TestQuestion3() {
        cout << "蓝凤凰致使华山师徒、桃吞六仙呕吐不止，如果你是大夫，会给他们开什么药():" << endl;
        cout << "a.阿司匹林  b.牛黄解毒片  c.氟哌酸  d.让他们喝大量的生牛奶  e.以上全不对" << endl;
        cout << "答案: " << Answer3() << endl;
    }
};

//学生甲抄的试卷
class TestPaperA : public TestPaper {
public:
    virtual string Answer1() {
        return "b";
    }
    virtual string Answer2() {
        return "a";
    }
    virtual string Answer3() {
        return "c";
    }
};

//学生乙抄的试卷
class TestPaperB : public TestPaper {
public:
    virtual string Answer1() {
        return "d";
    }
    virtual string Answer2() {
        return "b";
    }
    virtual string Answer3() {
        return "a";
    }
};

int main(int argc, char *argv[])
{
    cout << "学生甲抄的试卷: " << endl;
    shared_ptr<TestPaper> studentA(new TestPaperA());
    studentA->TestQuestion1();
    studentA->TestQuestion2();
    studentA->TestQuestion3();

    cout << "学生乙抄的试卷: " << endl;
    shared_ptr<TestPaper> studentB(new TestPaperB());
    studentB->TestQuestion1();
    studentB->TestQuestion2();
    studentB->TestQuestion3();

    return 0;
}
